{% extends "app01/base.html" %}
{% block title %}图书列表{% endblock title %}

{% block content-header %}
    图书查询系统
    <div style="float: right;">
        <a class="btn btn-default btn-xs" href="/app/book/add">
            <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 添加
        </a>
    </div>
{% endblock content-header %}

{% block content-body %}
    <div class="content_header">
    </div>
    <table class="table table-bordered table-hover table-striped">
        <tr>
            <th>序列号</th>
            <th>书名</th>
            <th>出版日期</th>
            <th>价格</th>
            <th>出版社</th>
            <th>操作</th>
        </tr>

        {% for info in data %}
            <tr>
                <td>{{ forloop.counter }}</td>
                <td>{{ info.title }}</td>
                <td>{{ info.pubDate }}</td>
                <td>{{ info.price }}</td>
                <td>{{ info.publish }}</td>
                <td>
                    <a href="/app/book/set/{{ info.id }}" class="btn btn-info btn-sm">修改</a>
                    <a href="/app/book/del/{{ info.id }}" class="btn btn-warning btn-sm">删除</a>
                </td>
            </tr>
        {% endfor %}

    </table>
{% endblock content-body%}